import  time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
#打开浏览器
driver.get("https://www.baidu.com")


driver.implicitly_wait(10)
kw = driver.find_element(By.ID, 'kw').get_attribute('outerHTML')
time.sleep(3)
driver.quit()
